<!-- 简版的界面 组成：purecss+zepto -->
<!DOCTYPE html>
<!-- saved from url=(0021)https://rs88881234.com -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="viewport"
	content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">
<title>1分钱换购10元代金券-大象与猩猩</title>
<meta name="format-detection" content="telephone=no">
<meta name="keywords" content="大象与猩猩,水果">
<meta name="description" content="大象与猩猩,水果">
<link href="../download_files/logo16.ico" rel="shortcut icon"
	type="image/x-icon">
<link rel="stylesheet" href="../assets/css/amazeui.min.css" />
<link rel="stylesheet" href="common.css" />
<!-- 因为 zepto 没有 fadeIn fadeOut函数，所以不要了 -->
<script src="../../resources/js/jquery-1.6.3.min.js"></script>
<script type="text/javascript">
	var w, h, className;
	function getSrceenWH() {
		w = $(window).width();
		h = $(window).height();
		$('#dialogBg').width(w).height(h);
	}

	window.onresize = function() {
		getSrceenWH();
	}
	$(window).resize();

	$(function() {
		getSrceenWH();

		//显示弹框
		$('.box a').click(
				function() {
					className = $(this).attr('class');
					$('#dialogBg').fadeIn(300);
					$('#dialog').removeAttr('class').addClass(
							'animated ' + className + '').fadeIn();
				});

		//关闭弹窗
		$('.claseDialogBtn').click(function() {
			$('#dialogBg').fadeOut(300, function() {
				$('#dialog').addClass('bounceOutUp').fadeOut();
			});
		});
	});
</script>
<style type="text/css">
body {
	background-color: #fff
}

body, html, p {
	margin: 0
}

a {
	outline: 0
}

.clearfix:after {
	display: block;
	height: 0;
	content: "";
	visibility: hidden;
	clear: both
}

.float-left-box {
	float: left
}

a {
	text-decoration: none
}

.download-icon {
	display: inline-block;
	height: 25px;
	width: 27px;
	background-position: -251px -2px;
	vertical-align: top;
	margin: 8px 8px 0 0
}

#content .top-btn {
	display: block;
	margin: 0 77px;
	background-color: #37d145;
	line-height: 43px;
	height: 43px;
	text-align: center;
	border-radius: 21.5px;
	font-size: 18px;
	color: #fff;
	font-family: "Microsoft Yahei", STXihei, "华文细黑", serif, sans-serif,
		arail
}

#content #top-btn:active, #content #top-btn:hover, #content #top-btn:link,
	#content #top-btn:visited {
	color: #fff
}

#content #more {
	font-size: 12px;
	color: #666;
	font-family: "Microsoft Yahei", STXihei, "华文细黑", serif, sans-serif,
		arail;
	-ms-transition: .5s -ms-transform, .5s opacity;
	-moz-transition: .5s -moz-transform, .5s opacity;
	-webkit-transition: .5s -webkit-transform, .5s opacity;
	transition: .5s transform, .5s opacity;
	text-align: center
}

#content #more img {
	width: 20px
}

#content #more.hide-animation {
	-ms-transform: translateX(-100px);
	-moz-transform: translateX(-100px);
	-webkit-transform: translateX(-100px);
	transform: translateX(-100px);
	opacity: 0
}

#content .line {
	position: relative;
	margin: 0 28px 35px
}

#content .line .icon5 {
	position: relative;
	margin: 0 auto;
	background-position: -251px -143px;
	width: 27px;
	height: 22px;
	top: -3px
}

#content .line .left-line {
	position: absolute;
	top: 6px;
	right: 50%;
	width: 142px;
	height: 1px;
	background-color: #eee
}

#content .line .right-line {
	position: absolute;
	top: 6px;
	left: 50%;
	width: 142px;
	height: 1px;
	background-color: #eee
}

#footer {
	-ms-transition: .5s -ms-transform, .5s opacity;
	-moz-transition: .5s -moz-transform, .5s opacity;
	-webkit-transition: .5s -webkit-transform, .5s opacity;
	transition: .5s transform, .5s opacity
}

#footer p {
	text-align: center;
	font-size: 13px;
	color: #333;
	font-family: "Microsoft Yahei", STXihei, "华文细黑", serif, sans-serif,
		arail
}

#footer p .func {
	color: #16769e
}

#footer .bottom-btn {
	width: 205px;
	height: 45px;
	margin: 18px auto 42px;
	display: block;
	text-align: center;
	background-color: #37d145;
	line-height: 45px;
	border-radius: 22.5px;
	font-size: 18px;
	color: #fff;
	font-family: "Microsoft Yahei", STXihei, "华文细黑", serif, sans-serif,
		arail
}

#footer .copyright {
	font-size: 10px;
	color: #333;
	font-family: "Microsoft Yahei", STXihei, "华文细黑", serif, sans-serif,
		arail;
	margin-bottom: 10px
}

#footer.hide-animation {
	-ms-transform: translateY(-100px);
	-moz-transform: translateY(-100px);
	-webkit-transform: translateY(-100px);
	transform: translateY(-100px);
	opacity: 0
}

.weixin {
	position: fixed;
	top: 0;
	width: 100%
}

.marker {
	position: fixed;
	top: 0;
	left: 0;
	margin: auto;
	width: 100%;
	height: 100%;
	-moz-opacity: .8;
	-khtml-opacity: .8;
	opacity: .8;
	filter: alpha(opacity = 80);
	background-color: #000;
	z-index: 909
}

.weixin-bg-img {
	float: right
}

.weixin-btn {
	margin: 215px auto 0;
	height: 50px;
	width: 125px;
	display: block;
	border: none;
	padding: 0;
	cursor: pointer;
	outline: 0
}

@media screen and (max-height:460px) {
	#content #top-btn {
		margin: 15px 77px 18px
	}
}

@media screen and (max-height:418px) {
	#content #top-btn {
		margin: 15px 77px 11px
	}
}
</style>
<!-- loading -->
</head>
<body>
	<!-- start the header -->
	<div id="header">
		<img id="header-img" src="image.jpg" alt="banner" width="100%">
	</div>
	<!-- end the header -->
	<div id="content" class="box">
		<a id="top-btn" class="top-btn" href="javascript:;"
			style="margin: 22px 90px; margin-top: 30px;"><i
			class="am-icon-male"></i><span class="am-u-sm-centered">登陆领取</span></a> <a
			id="top-btn2" class="top-btn" href="../help/free/help.html"
			style="margin: 2px 90px;"><i class="am-icon-question"></i><span
			class="am-u-sm-centered">点我帮助</span></a>

		<div class="line" style="margin-top: 30px;">
			<div class="left-line"></div>
			<div class="right-line"></div>
			<div class="sprite icon5"></div>
		</div>
	</div>
	<!-- dialog -->
	<div id="dialogBg"></div>
	<div id="dialog" class="animated">
		<img class="dialogIco" width="50" height="50" src="ico.png" alt="" />
		<div class="dialogTop">
			<a href="javascript:;" class="claseDialogBtn">关闭</a>
		</div>
		<div class="am-g" style="margin-top: 10px; margin-bottom: 10px;">
			<div class="am-u-lg-6 am-u-md-8 am-u-sm-centered">
				<form class="am-form" id="submitForm">
					<div class="am-form-group am-form-icon">
						<i class="am-icon-user"></i><input type="tel" name="phone"
							id="phone" class="am-form-field" placeholder="请输入手机号">
					</div>
					<div class="am-form-group am-form-icon">
						<i class="am-icon-lock"></i><input type="password"
							class="am-form-field" name="password" id="password"
							placeholder="请输入密码">
					</div>
					<input id="login" type="submit" name="" value="登 录"
						class="am-btn am-btn-primary am-u-sm-12"> <br /> <br />
					<div class="am-cf am-margin-top-xs">
						<a href="../wechat-getback.html" id="forgetPassword"
							class="am-btn am-btn-default am-btn-sm am-fl">忘记密码</a> <a
							href="../wechat-register.html" id=""
							class="am-btn am-btn-default  am-btn-sm am-fr">立即注册</a>
					</div>
				</form>


			</div>
		</div>
	</div>
	<!-- 载入框架 -->

	<div id="loading" class="animated" style='text-align: center'>
		<br>   <i
			class="am-icon-refresh am-icon-spin   am-icon-md"></i>&nbsp;&nbsp;&nbsp;&nbsp;
		登陆成功，正在加载订单页面 <br> <br>
	</div>
	<!-- start the footer -->
	<div id="footer" class="">
		<p>下载“大象与猩猩-APP”，更多精彩等你发现......</p>
		<p>
			<a id="bottom-btn" class="bottom-btn"
				href="http://a.app.qq.com/o/simple.jsp?pkgname=com.dxyxx&g_f=991653"><i
				class="am-icon-download"></i><span class="am-u-sm-centered">APP下载</span></a>
		</p>
		<p class="copyright">©2014-2016 www.rs88881234.com, All Rights
			Reserved</p>
		<p class="copyright">备案/许可编号为：浙ICP备14017672号</p>
	</div>
	<script type="text/javascript">
		$("#submitForm")
				.submit(
						function submitPWD() {
							if (!$('#phone').val() || !$('#password').val()) {
								alert("手机或者密码不能为空");
								return false;
							}
							event.preventDefault();
							$
									.ajax({
										type : "GET",
										url : "../../encryption/transfer?plain="
												+ $('#password').val(),
										success : function(data) {
											console.log(data);
											if (data.code == 1) {
												//$('#password').attr('value',data.object);
												$('#password').val(data.object);
												$
														.ajax({
															type : "POST",
															url : "../../login",
															data : $(
																	"#submitForm")
																	.serialize(),
															success : function(
																	data) {
																console
																		.log(data);
																if (data.code == 1) {
																	// 登陆成功之后 ， 下单。然后去下单. 这里应该显示 一个 旋转框架。 提示登陆成功，正在生成订单
																	// 关闭登陆框架
																	$('#password').val("");
																	$('#dialogBg').fadeOut(300, function() {
																		$('#dialog').addClass('bounceOutUp').fadeOut();
																	});
																	// 显示加载条
																    className = $(this).attr('class');
																	$('#dialogBg').fadeIn(300);
																	$('#loading').removeAttr('class').addClass(
																		'animated ' + className + '').fadeIn();
																	// 发出 加载 订单 请求
																	$
																			.ajax({
																				type : "GET",
																				url : "../../freeticket/add?version=1",
																				success : function(
																						data) {
																					console
																							.log(data);
																					if (data.code == 1) {
																						//得到uuid
																						window.location.href = "../../mainServlet?uuid="
																								+ data.object.uuid;
																					} else {
																						alert(data.info);
																						//关闭loadding 框架
																						$('#dialogBg').fadeOut(300, function() {
																							$('#loading').addClass('bounceOutUp').fadeOut();
																						});
																					}
																				},
																				error : function(
																						data) {
																				}
																			});
																} else {
																	alert(data.info);
																	$(
																			'#password')
																			.val(
																					"");
																}
															},
															error : function(
																	data) {
															}
														});

											} else {
												alert(data.info);
											}
										},
										error : function(data) {
										}
									});

						});
	</script>
</body>
</html>
